<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>

<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<div class="container">
<div style="margin-bottom:100px;text-align: center;vertical-align: middle;padding:40px">
<h3>spring mvc测试工程</h3>
</div>
<div><form action="${ctx}/event" method="post">
物品名：<input type="text" name="name"/>
描述：<input type="text" name="details">
<input type="submit" value="提交">
</form></div>
<div >
<table class="table table-hover" border="2" style="text-align: center;width: 100%">
  <thead>
    <tr>
      <th>#</th>
      <th>Eventname</th>
      <th>Eventdetails</th>
      <th>编辑</th>
    </tr>
  </thead>
  <tbody>
  	<c:forEach items="${events}" var="event">
    <tr>
      <td>${event.id }</td>
      <td>${event.name}</td>
       <td>${event.details }</td>
      <td><a href="${ctx}/event/${event.id}">删除</a></td>
    </tr>
    </c:forEach>
  </tbody>
</table>
</div>
</div>